<template>
	<view>
			<u-button @click="yzas">点击获取条形验证码</u-button>
			<u-button @click="swipers">点击获取轮播图</u-button>
			<u-button @click="keword">点击获取搜索推荐</u-button>
			<u-button @click="lists">点击获取品牌列表列表</u-button>
			<u-button @click="pages">首页推荐商品</u-button>
			<u-button @click="updates"> 获取上拉首页</u-button>
			<u-button @click="issues">获取常见问题列表</u-button>
			<u-button @click="login">获取验证接口</u-button>
			<u-button @click="checks">图形验证码</u-button>
			<u-button @click="users">获取用户基本信息</u-button>
			<u-button @click="seeting">获取网站基础配置信息</u-button>
			<u-button @click="flys">获取商品列表</u-button>
			<u-button @click="details">获取商品详情</u-button>
			<u-button @click="search">搜索商品接口</u-button>
			<u-button @click="collent">点击获取分类及商品</u-button>
	</view>
</template>

<script>
	import {Collent,Details,Yzas,Swiper,Kewords,Brand,Page,Update,Issue,Logins,Check,User,Setting,Classify,Search} from "../../api/api.js"
	import {
		v4 as uuidv4
	} from 'uuid';
// import swiper from "../../uni_modules/uview-ui/libs/config/props/swiper.js";
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			async collent(){
				let data={
					page:1,
					limit:10
				}
				let res= await Collent(data)
				console.log(res)
			},
			async search(){
				let data={
					page: "1", 
					limit: "10", 
					keyword: "苹果", 
					type: "1" 
				}
				let res=await Search(data)
				console.log(res)
			},
			async details(){
				let data ={
					id:1
				}
				let res=await Details(data)
				console.log(res)
			},
			async flys(){
				let res=await Classify()
				console.log(res)
			},
			async seeting(){
				let res=await Setting()
				console.log(res)
			},
			async users(){
				let res=await User()
				console.log(res)
			},
			async checks(){
				let data={
					"captchaId": uuidv4(), 
					"type": 1, 
					"captcha": "QREQ" 	
				}
				let res=await Check(data)
				console.log(res)
			},
			async login(){
				let data={
					mobile: "15777159663", 
					keep: false, 
					sms_code: "649317", 
					template_code: "register_login" 
				}
				let res=await Logins(data)
				console.log(res)
			},
			async issues(){
				let res=await Issue()
				console.log(res)
			},
			async updates(){
				let page=1
				let res=await Update(page)
				console.log(res)
			},
			async pages(){
				let res= await Page()
				console.log(res)
			},
			 async lists(){
				let res=await Brand()
				 console.log(res)
			 },
			async keword(){
				let res=await Kewords()
				console.log(res)
			},
				async swipers(){
					let res=await Swiper()
					console.log(res)
				},
			async yzas(){
					let id= uuidv4()
					console.log(uuidv4())
					let res=await Yzas(id)
					console.log(res)
				}
		}
	}
</script>

<style>

</style>
